package kr.hkit.powerjava.algorithm;

public class StackTest {
	public static void main(String[] args) {
		int size = 3;
		Structure stack = new Stack(size);
		stack.push("a");
		stack.prnStack();
		stack.push("b");
		stack.prnStack();
		
		for(int i=0; i<3; i++){
			System.out.println("pop " + stack.pop());
			stack.prnStack();
		}
		
		for(int i=97; i<size+98; i++){
			stack.push(String.format("%c", i));	//is Full
			stack.prnStack();
		}

		Structure queue = new Queue();
		queue.push("a");
		queue.prnStack();
		queue.push("b");
		queue.prnStack();
		
		for(int i=0; i<3; i++){
			System.out.println("pop " + queue.pop());
			queue.prnStack();
		}
		
		for(int i=97; i<size+98; i++){
			queue.push(String.format("%c", i));	//is Full
			queue.prnStack();
		}
	}
}
